home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1998 June / Software of the Month Club 1998 June.iso / mac / Business / Hi's Universal Saver / Dialog Director v0.6 / Examples / Switch Apps.as < prev    next >
Encoding:
Text File  |  1998-04-13  |  553 b   |  10 lines  |  [TEXT/ToyS]

  1. on run
  2.     tell application "Finder" to set p to ["Finder"] & name of processes
  3.     set dItems to [┬
  4.         {class:push button, bounds:[190, 265, 250, 285], name:"OK", enabled:4}, ┬
  5.         {class:push button, bounds:[110, 265, 170, 285], name:"Cancel"}, ┬
  6.         {class:static text, bounds:[10, 10, 250, 26], contents:"Choose an application:"}, ┬
  7.         {class:list box, bounds:[20, 40, 240, 240], contents:p}]
  8.     set d to dd auto dialog {size:[260, 295], contents:dItems, timeout after:60} with greyscale
  9.     if item 1 of d then activate application (item (item 4 of d) of p)
  10. end run